package com.yunshipei.model;

import io.rong.imlib.model.Conversation;
import io.rong.imlib.model.Message;
import io.rong.imlib.model.MessageContent;

/**
 * Created by cike on 16/6/22.
 */
public class MessageHistoryModel {
    private Conversation.ConversationType conversationType;
    private String title;
    private String avator;
    private String targetId;
    private Message message;

    public MessageHistoryModel(){}

    public MessageHistoryModel(String title, String targetId, Message message){
        this.title = title;
        this.targetId = targetId;
        this.message = message;
        if (message != null)
        this.conversationType = message.getConversationType();
    }

    public Conversation.ConversationType getConversationType() {
        return conversationType;
    }

    public void setConversationType(Conversation.ConversationType conversationType) {
        this.conversationType = conversationType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public Message getMessage() {
        return message;
    }

    public void setMessage(Message message) {
        this.message = message;
        if (message != null)
            targetId = message.getTargetId();
    }

    public String getAvator() {
        return avator;
    }

    public void setAvator(String avator) {
        this.avator = avator;
    }
}
